package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitBannerFocusMapper;
import com.ruoyi.bus.domain.WitBannerFocus;
import com.ruoyi.bus.service.IWitBannerFocusService;

/**
 * banner管理Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-06-19
 */
@Service
public class WitBannerFocusServiceImpl implements IWitBannerFocusService 
{
    @Autowired
    private WitBannerFocusMapper witBannerFocusMapper;

    /**
     * 查询banner管理
     * 
     * @param bannerId banner管理ID
     * @return banner管理
     */
    @Override
    public WitBannerFocus selectWitBannerFocusById(Long bannerId)
    {
        return witBannerFocusMapper.selectWitBannerFocusById(bannerId);
    }

    /**
     * 查询banner管理列表
     * 
     * @param witBannerFocus banner管理
     * @return banner管理
     */
    @Override
    public List<WitBannerFocus> selectWitBannerFocusList(WitBannerFocus witBannerFocus)
    {
        return witBannerFocusMapper.selectWitBannerFocusList(witBannerFocus);
    }

    /**
     * 新增banner管理
     * 
     * @param witBannerFocus banner管理
     * @return 结果
     */
    @Override
    public int insertWitBannerFocus(WitBannerFocus witBannerFocus)
    {
        witBannerFocus.setCreateTime(DateUtils.getNowDate());
        return witBannerFocusMapper.insertWitBannerFocus(witBannerFocus);
    }

    /**
     * 修改banner管理
     * 
     * @param witBannerFocus banner管理
     * @return 结果
     */
    @Override
    public int updateWitBannerFocus(WitBannerFocus witBannerFocus)
    {
        return witBannerFocusMapper.updateWitBannerFocus(witBannerFocus);
    }

    /**
     * 批量删除banner管理
     * 
     * @param bannerIds 需要删除的banner管理ID
     * @return 结果
     */
    @Override
    public int deleteWitBannerFocusByIds(Long[] bannerIds)
    {
        return witBannerFocusMapper.deleteWitBannerFocusByIds(bannerIds);
    }

    /**
     * 删除banner管理信息
     * 
     * @param bannerId banner管理ID
     * @return 结果
     */
    @Override
    public int deleteWitBannerFocusById(Long bannerId)
    {
        return witBannerFocusMapper.deleteWitBannerFocusById(bannerId);
    }
}
